﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JEdwonTune.Lib.Hibernate {
    public class ColumnEO {
        private String _Name;
        public String Name {
            set { _Name = value; }
            get { return _Name; }
        }
        public String PropertyName {
            set { }
            get {
                return MyUtil.ParseName2EOStyle(_Name);
            }
        }
        private Boolean _Nullable;
        public Boolean Nullable {
            set { _Nullable = value; }
            get { return _Nullable; }
        }
        public String NullableText {
            set { }
            get { return (_Nullable)?"":"No"; }
        }
        private String _DataType;
        public String DataType {
            set { _DataType = value; }
            get { return _DataType; }
        }
        public String PropertyType {
            set {  }
            get { return DbUtil.ParseDataType2ProertyType(_DataType,_Nullable); }
        }
        private String _Comment;
        public String Comment {
            set { _Comment = value; }
            get { return _Comment; }
        }
        private Int32 _Length;
        public Int32 Length {
            set { _Length = value; }
            get { return _Length; }
        }
        private String _TableName;
        public String TableName {
            set { _TableName = value; }
            get { return _TableName; }
        }

        private Boolean _Update = true;
        public Boolean Update {
            set { _Update = value; }
            get { return _Update; }
        }
        private Boolean _Insert = true;
        public Boolean Insert {
            set { _Insert = value; }
            get { return _Insert; }
        }
        private Boolean _IsPK = false;
        public Boolean IsPK {
            get { return _IsPK; }
            set { _IsPK = value; }
        }
    }
}
